import React from 'react'
import classes from './BackDrop.module.css'
import ReactDOM from 'react-dom'

const BackDropRoot = document.getElementById('backdrop-root')

const BackDrop = (props) => {
    return ReactDOM.createPortal(
        <div {...props} className={`${classes.BackDrop} ${props.className}`}>
            {props.children}
        </div>
        , BackDropRoot
    )
}

export default BackDrop